You are here: Statements and Functions > ForLocation()
Syntax samples
FORLOCATION()
IF FORLOCATION() THEN Priority 100
IF FORLOCATION() THEN
INC Arr1 [1, 2]
ELSE
INC Arr1 [2, 2]
This function returns TRUE if the object executing the shift or break logic is a location.
Shift or break logic.
Example
We assign three resources (Oper1, Oper2, and Oper3) and two locations (Mill1 and Mill2) to a shift. When the locations go off-shift, the example uses a resource called Maint for 10 minutes to clean up around the machines. Because we assigned the same shift to locations and resources, we need to check if the object executing the off-shift logic is a location. We place the following logic in the off-shift logic:
IF FORLOCATION() THEN USE Maint FOR 10 min
FORRESOURCE(). Also see Shift & Break Logic.